﻿package com.urbansquall.ui
{

import flash.display.*;
import flash.filters.GlowFilter;

public class TextButton extends RegularBitmapButton
{	
	public function TextButton( a_img:DisplayObject, a_text: String )
	{
		super( a_img );
		
		var upTf: CustomTextField = new CustomTextField( a_text, 0xFFFFFF, 24 );
		upTf.x = ( this.upState.width - upTf.width ) / 2;
		upTf.y = ( this.upState.height - upTf.height ) / 2;
		upTf.filters = [ new GlowFilter( 0x000000, 1, 2, 2, 32 ) ];
		(this.upState as Sprite).addChild( upTf );
		
		var overTf: CustomTextField = new CustomTextField( a_text, 0xFFFFFF, 24 );
		overTf.x = ( this.overState.width - overTf.width ) / 2;
		overTf.y = ( this.overState.height - overTf.height ) / 2;
		overTf.filters = [ new GlowFilter( 0x000000, 1, 2, 2, 32 ) ];
		(this.overState as Sprite).addChild( overTf );
		
		var downTf: CustomTextField = new CustomTextField( a_text, 0xFFFFFF, 24 );
		downTf.x = ( this.downState.width - downTf.width ) / 2;
		downTf.y = ( this.downState.height - downTf.height ) / 2;
		downTf.filters = [ new GlowFilter( 0x000000, 1, 2, 2, 32 ) ];
		(this.downState as Sprite).addChild( downTf );
		
	}
}
	
}